package Gestores;

public class NucleoBaseDatos {

    private static DataBaseLink sgbd = null;

    private NucleoBaseDatos() {
    }

    public static DataBaseLink getInstance() {
        synchronized (NucleoBaseDatos.class) {
            if (NucleoBaseDatos.sgbd == null) {
                try {
                    sgbd = new DataBaseLink();
                    sgbd.setIP("192.168.0.12");
                    sgbd.setPort("3306");
                    sgbd.setBaseDatos("Base_Economistas");
                    sgbd.setUsuario("root");
                    sgbd.setContrasena("asdf");
                    sgbd.startConnection();
                } catch (Exception error) {
                    System.err.println(error);
                }
            }
        }

        return NucleoBaseDatos.sgbd;
    }
}
